package com.eastedu.repository.ktree.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eastedu.entity.jdbc.BaseAutoIdEntity;
import jakarta.persistence.Column;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * 章节树节点
 *
 * @author luozhenzhong
 */
@Getter
@Setter
@ToString
@RequiredArgsConstructor
@TableName(value = "t_chapter_node_map")
public class ChapterNodeMapPO extends BaseAutoIdEntity<ChapterNodeMapPO> {

    @Column(name = "main_tree_node_id", nullable = false, columnDefinition = "varchar(36) COMMENT '主树节点ID'")
    private String mainTreeNodeId;

    @Column(name = "node_id", nullable = false, columnDefinition = "varchar(36) COMMENT '节点ID'")
    private String nodeId;

    @TableLogic(value = "1", delval = "0")
    @TableField(value = "available", fill = FieldFill.INSERT)
    @Column(name = "available", nullable = false, columnDefinition = "bit default 1 COMMENT '是否可用'")
    private Boolean available;


}
